package com.cl.blog.web;

import com.cl.blog.common.Result;
import com.cl.blog.document.MailDto;
import com.cl.blog.service.impl.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 付
 * @Date 2024-03-28 17:21
 * @Version 1.0
 * @description
 * @since 1.0
 */

@RestController
@RequestMapping("/mail")
public class EmailController {
	@Autowired
	MailService mailService;

	@PostMapping("/send")
	public Result emailSender(@RequestBody MailDto dto) throws Exception {
		mailService.ostSeander(dto);
		return Result.success();
	}

}
